package com.jz.netthings.application.providerCollection.controller;


import com.baomidou.mybatisplus.mapper.EntityWrapper;
import com.baomidou.mybatisplus.mapper.Wrapper;
import com.jz.netthings.application.providerCollection.bean.ProviderCollectionProcess;
import com.jz.netthings.application.providerCollection.bean.ProvisionConsumable;
import com.jz.netthings.application.providerCollection.service.ProviderCollectionProcessService;
import com.jz.netthings.application.providerCollection.service.ProvisionConsumableService;
import com.jz.netthings.exception.AdscmSystemException;
import com.jz.netthings.support.SimpleCoreResponse;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RestController;

import javax.servlet.http.HttpServletRequest;
import java.io.IOException;
import java.util.List;

/**
 * <p>
 * 采浆记录-采浆过程 前端控制器
 * </p>
 *
 * @author zyl
 * @since 2019-03-28
 */
@RestController
@RequestMapping("/adscm/application/providerCollection/select/providerCollectionProcess")
public class ProviderCollectionProcessController {
    @Autowired
    ProviderCollectionProcessService providerCollectionProcessService;
    @RequestMapping("/selectProviderCollectionProcess")
    public SimpleCoreResponse selectProviderCollectionProcess(String id , HttpServletRequest request) throws AdscmSystemException, IOException {
        Wrapper<ProviderCollectionProcess> providerCollectionProcessWrapper =new EntityWrapper<>();
        providerCollectionProcessWrapper.eq("proc_id",id);
        List<ProviderCollectionProcess> providerCollectionProcesses = providerCollectionProcessService.selectList(providerCollectionProcessWrapper);
        return new SimpleCoreResponse("200","查询成功" ,providerCollectionProcesses);
    }
}

